package base.jni;

import base.demo.SoundCard;

public class JniDemo {
    static {
        //加载具体路径下的.so文件
        System.load("D:\\file\\cFile\\demo\\jnidemo\\libSimple.so");

        //加载Android libs目录下的.so库
//        System.loadLibrary("E:\\file\\cFile\\demo\\jnidemo\\libSimple.so");
    }

    public static void main(String[] args) {
        JniDemo demo=new JniDemo();
        System.out.println("********");
        demo.callAddMethod();

        MyPointer myPointer= demo.getPoint();

        System.out.println("x="+myPointer.getX()+";y="+myPointer.getY());

        System.out.println("###############  end ");
    }

    //c语言掉java方法
    public int add(int num1,int num2){
        return num1+num2;
    }

    public native void callAddMethod();
    public native MyPointer getPoint();




}
